package com.xiaoxiong.mami.service;

import com.xiaoxiong.mami.dao.daomain.OrderInfo;
import com.xiaoxiong.mami.dao.mapperImpl.OrderInfoMapperImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/7/27.
 */
@Service
public class OrderInfoService implements OrderInfoMapperImpl {

    @Autowired
    OrderInfoMapperImpl orderInfoMapperImpl;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public OrderInfo selectByPrimaryKey(Long id) {
        return null;
    }

    @Override
    public int updateByPrimaryKey(OrderInfo record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKeySelective(OrderInfo record) {
        return 0;
    }

    @Override
    public int insertSelective(OrderInfo record) {
        return 0;
    }

    @Override
    public int insert(OrderInfo record) {
        return 0;
    }

    @Override
    public List<OrderInfo> queryOrderByOrderId(String orderId) {
        return null;
    }

    @Override
    public OrderInfo queryOrderItem(@Param("userId") String userId, @Param("orderId") String orderId) {
        return orderInfoMapperImpl.queryOrderItem(userId,orderId);
    }
    @Override
    public OrderInfo queryOrderItemById(String orderId) {
        return orderInfoMapperImpl.queryOrderItemById(orderId);
    }

    @Override
    public List<OrderInfo> getOrderListByUserIdAndStatus(String userId, String orderStatus, int start, int end) {
        return orderInfoMapperImpl.getOrderListByUserIdAndStatus(userId,orderStatus,start,end);
    }
    @Override
    public List<OrderInfo> getOrderListByStatus(String orderStatus) {
        return orderInfoMapperImpl.getOrderListByStatus(orderStatus);
    }
    @Override
    public List<OrderInfo> getOrderListByStatusLimit(String orderStatus, int start, int end) {
        return orderInfoMapperImpl.getOrderListByStatusLimit(orderStatus,start,end);
    }
    @Override
    public List<OrderInfo> getOrderListByUserId(String userId, int start, int end) {
        return orderInfoMapperImpl.getOrderListByUserId(userId,start,end);
    }

    @Override
    public int getOrderCountByStatus(String userId, String orderStatus) {
        return orderInfoMapperImpl.getOrderCountByStatus(userId,orderStatus);
    }
    @Override
    public int getOrderCountStatus(String orderStatus) {
        return orderInfoMapperImpl.getOrderCountStatus(orderStatus);
    }
    @Override
    public int getOrderCount(String userId) {
        return orderInfoMapperImpl.getOrderCount(userId);
    }

    @Override
    public int queryCountByOrderId(String orderId) {
        return 0;
    }

    @Override
    public int insertOrder(OrderInfo orderInfo) {
        return orderInfoMapperImpl.insertOrder(orderInfo);
    }

    @Override
    public OrderInfo getOrderByOrderId(String orderId) {
       return orderInfoMapperImpl.getOrderByOrderId(orderId);
    }

    @Override
    public int updateStatusByOrderId(String orderId, String orderStatus,String statusName) {
        return orderInfoMapperImpl.updateStatusByOrderId(orderId, orderStatus,statusName);
    }
}
